Image smoothing filters, which include the Gaussian, Maximum, Mean, Median, Minimum, Non-Local Means, Percentile, and Rank filters, can be applied to reduce the amount of noise in an image. You should note that although these filters can effectively reduce noise, they must be used with care so as to not alter important information contained in the image. You should also note that in many cases, edge detection or enhancement should not be applied before smoothing.
The effect of applying the Gaussian filter is to blur an image and remove detail and noise. In this sense it is similar to the Mean filter. However, it uses a kernel that represents the shape of a Gaussian or bell-shaped hump. In contrast to the Mean filter’s uniformly weighted average, the Gaussian filter outputs a weighted average of each pixel’s neighborhood, with the average weighted more towards the value of the central pixels. Because of this, the Gaussian filter provides gentler smoothing and preserves edges better than a similarly sized Mean filter.
One of the principle justifications for using the Gaussian filter for smoothing is due to its frequency response. Most convolution-based smoothing filters act as lowpass frequency filters. This means that their effect is to remove high spatial frequency components from an image. By choosing an appropriately sized Gaussian you can be fairly confident about what range of spatial frequencies will be present in the image after filtering, which is not the case with the Mean filter. The Gaussian filter is also attracting attention from computational biologists because it has been attributed with some amount of biological plausibility. For example, some cells in the visual pathways of the brain often have an approximately Gaussian response.
You should note that Gaussian smoothing is commonly used prior to edge detection since many edge-detection filters are sensitive to noise.
References
http://homepages.inf.ed.ac.uk/rbf/HIPR2/gsmooth.htm
http://en.wikipedia.org/wiki/Gaussian_filter
Mean filtering is a simple method of smoothing and diminishing noise in images by eliminating pixel values that are unrepresentative of their surroundings. The idea of mean filtering is to replace each pixel value in an image with the mean or average value of its neighbors, including itself.
Like other convolution filters, the Mean filter is based around a kernel, which represents the shape and size of the neighborhood to be sampled when calculating the mean. Often a 3x3 square kernel is used, although larger kernels can be used for more severe smoothing. Note that a small kernel can be applied more than once in order to produce a similar, but not identical effect, as a single pass with a large kernel.
You may notice that although noise is less apparent after mean filtering, the image has been softened or blurred and has lost high frequency detail. This usually occurs due to the following limitations of the filter:
Both of these problems can be tackled by the Median filter, which is used more often for reducing noise than the Mean filter. Other convolution filters that do not calculate the mean of a neighborhood are also often used for smoothing. One of the most common of these is the Gaussian filter.
Mean shift filtering, which can be used for edge-preserving smoothing, is based on a data clustering algorithm commonly used in image processing. For each pixel of an image having a spatial location and a particular grayscale value, the set of neighboring pixels is determined. For this set of neighbor pixels, the new spatial center (spatial mean) and the new mean value are calculated. These calculated mean values then serve as the new center for the next iteration. The described procedure will be iterated until the spatial and the grayscale mean stops changing. At the end of the iteration, the final mean value will be assigned to the starting position of that iteration.
References
http://saravananthirumuruganathan.wordpress.com/2010/04/01/introduction-tomean-shift-algorithm/
The Median filter is normally used to reduce noise in an image, and can often do a better job of preserving detail and edges in an image than the Mean filter. Like the Mean filter, this filter considers each pixel in the image in turn and looks at its nearby neighbors to decide whether or not it is representative of its surroundings. However, instead of simply replacing the pixel value with the mean of neighboring pixel values, it replaces it with the median of those values. Median filters are particularly useful for removing random intensity spikes that often occur in images captured in microscopes.
The following illustration shows how this filter works. The median is calculated by first sorting all the pixel values from the surrounding neighborhood, in this case a 3x3 square, into numerical order and then replacing the pixel being considered with the middle pixel value.
Median filter
As shown in the illustration, the central pixel value of 150 is not representative of the surrounding pixels and is replaced with the median value of 124. You should note that using larger neighborhoods will produce more severe smoothing.
By calculating the median value of a neighborhood rather than the mean, the Median filter has two main advantages over the Mean filter:
However, the Median filter is sometimes not as subjectively good at dealing with large amounts of Gaussian noise as the Mean filter. It is also relatively complex to compute.
Unlike the Mean filter, which takes the mean value of a group of pixels surrounding a target pixel to smooth an image, the Non-Local Means filter takes the mean of all pixels in the image, weighted by how similar they are to the target pixel. Applying this filter can result in greater post-filtering clarity with minimal loss of detail when compared with mean filtering. In many cases, the Non-Local Means or Bilateral filter should be your first choice for smoothing noisy images.
You should note that non-local means filtering works most effectively if the noise present in the data is white noise, in which case most features present in the image will be preserved, even small and thin ones.
References
An optimized blockwise non-local means denoising filter for 3D magnetic resonance images, P. Coupé, P. Yger, S. Prima, P. Hellier, C. Kervrann, C. Barillot. IEEE Transactions on Medical Imaging. 2008 April;27(4):425-441.
This filter is only available in Dragonfly Pro. Contact Object Research Systems for information about the availability of Dragonfly Pro.